<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>14-单选组件</title>
    <!--Vue必须放上面-->
    <script src="../js/vue.js"></script>
    <!--ElementUi-->
    <script src="../element-ui/lib/index.js"></script>
    <link rel="stylesheet" href="../element-ui/lib/theme-chalk/index.css">
</head>
<body>
<div id="app">
    <!--以前的单选框VS现在的单选框-->
    <input type="radio" value="1" name="sex" checked>男
    <input type="radio" value="0" name="sex">女

    <hr>
    <!--
          单选组件：  el-radio-group > el-radio    组合  ,   行级组件
                    <el-radio> : 单选组件中的选项
                    label： 类似传统的value属性
    -->
    <el-radio-group v-model="sex">
        <el-radio label="1" name="sex">男</el-radio>
        <el-radio label="0" name="sex">女</el-radio>
    </el-radio-group>

</div>
<script>
    const vm = new Vue({
        el: "#app",
        data: {
            sex: "1",
        },
        methods: {}
    });
</script>
</body>
</html>